/*
 * @Author: RYPY
 * @Date: 2021-04-28 14:24:52
 * @LastEditors: RYPY
 * @LastEditTime: 2021-04-29 11:50:19
 */
console.log('begin');//t 1
setTimeout(()=>{//y
    console.log('setTimeout1');// 3
    Promise.resolve().then(()=>{
        console.log('promise1');//4
        setTimeout(()=>{
            console.log('setTimeout2betweenpromise1&2');//6
        });
    }).then(()=>{
        console.log('promise2');//5
    });
},0);
console.log('end');//t 2